Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Types and Constants


Control Data Tag Constants

NEW WITH THE APPEARANCE MANAGER

The constants described here are passed in the inTagName parameters of SetControlData and GetControlData to specify the piece of data in a control that you wish to set or get. You can also pass these constants in the inTagName parameter of GetControlDataSize if you wish to determine the size of variable-length control data (e.g., text in an editable text control). These constants can also be used by custom control definition functions that return the feature bit kControlSupportsDataAccess in response to a kControlMsgGetFeatures message.

The data that your application gets or sets can be of various types. The list below shows the data types for the information that you can set in the inData parameter to the SetControlData function and that you can get in the inBuffer parameter to the GetControlData function.

enum {
   kControlPushButtonDefaultTag           = ('dflt'),
   kControlBevelButtonContentTag          = ('cont'),
   kControlBevelButtonTransformTag        = ('tran'),
   kControlBevelButtonTextAlignTag        = ('tali'),
   kControlBevelButtonTextOffsetTag       = ('toff'),
   kControlBevelButtonGraphicAlignTag     = ('gali'),
   kControlBevelButtonGraphicOffsetTag    = ('goff'),
   kControlBevelButtonTextPlaceTag        = ('tplc'),
   kControlBevelButtonMenuValueTag        = ('mval'),
   kControlBevelButtonMenuHandleTag       = ('mhnd'),
   kControlBevelButtonCenterPopupGlyphTag = ('pglc'), 
   kControlTriangleLastValueTag           = ('last'),
   kControlProgressBarIndeterminateTag    = ('inde'),
   kControlTabContentRectTag              = ('rect'),
   kControlTabEnabledFlagTag              = ('enab'),
   kControlTabInfoTag                     = ('tabi'),
   kControlGroupBoxMenuHandleTag          = ('mhan'),
   kControlImageWellContentTag            = ('cont'),
   kControlImageWellTransformTag          = ('tran'),
   kControlClockLongDateTag               = ('date'),
   kControlUserItemDrawProcTag            = ('uidp'),
   kControlUserPaneDrawProcTag            = ('draw'),
   kControlUserPaneHitTestProcTag         = ('hitt'),
   kControlUserPaneTrackingProcTag        = ('trak'),
   kControlUserPaneIdleProcTag            = ('idle'),
   kControlUserPaneKeyDownProcTag         = ('keyd'),
   kControlUserPaneActivateProcTag        = ('acti'),
   kControlUserPaneFocusProcTag           = ('foci'),
   kControlUserPaneBackgroundProcTag      = ('back'),
   kControlEditTextTextTag                = ('text'),
   kControlEditTextTEHandleTag            = ('than'),
   kControlEditTextSelectionTag           = ('sele'),
   kControlEditTextPasswordTag            = ('pass'),
   kControlStaticTextTextTag              = ('text'),
   kControlStaticTextTextHeightTag        = ('thei'),
   kControlIconTransformTag               = ('trfm'),
   kControlIconAlignmentTag               = ('algn'),
   kControlListBoxListHandleTag           = ('lhan'),
   kControlFontStyleTag                   = ('font'),
   kControlKeyFilterTag                   = ('fltr'),
   kControlBevelButtonLastMenuTag         = ('lmnu'),
   kControlBevelButtonMenuDelayTag        = ('mdly'),
   kControlPopupButtonMenuHandleTag       = ('mhan'),
   kControlPopupButtonMenuIDTag           = ('mnid'),
   kControlListBoxDoubleClickTag          = ('dblc'),
   kControlListBoxLDEFTag                 = ('ldef')
};

Constant descriptions

kControlPushButtonDefaultTag
Tells Appearance-compliant button whether to draw a default ring, or returns whether the Appearance Manager draws a default ring for the button.
Data type returned or set: Boolean
kControlBevelButtonContentTag
Gets or sets a bevel button's content type for drawing; see "Bevel Button and Image Well Content Type Constants".
Data type returned or set: ControlButtonContentInfo structure
kControlBevelButtonCenterPopUpGlyphTag
Gets or sets the position of the pop-up arrow in a bevel button when a pop-up menu is attached.
Data type returned or set: Boolean; if true, glyph is vertically centered on the right; if false, glyph is on the bottom right.
kControlBevelButtonTransformTag
Gets or sets a transform that is added to the standard transform of a bevel button; see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: IconTransformType
kControlBevelButtonTextAlignTag
Gets or sets the alignment of text in a bevel button; see "Bevel Button Text Alignment Constants".
Data type returned or set: ControlButtonTextAlignment
kControlBevelButtonTextOffsetTag
Gets or sets the number of pixels that text is offset in a bevel button from the button's left or right edge; this is used with left, right, or system justification, but it is ignored when the text is center aligned.
Data type returned or set: SInt16
kControlBevelButtonGraphicAlignTag
Gets or sets the alignment of graphics in a bevel button in relation to any text the button may contain; see "Bevel Button Graphic Alignment Constants".
Data type returned or set: ControlButtonGraphicAlignment
kControlBevelButtonGraphicOffsetTag
Gets or sets the horizontal and vertical amounts that a graphic element contained in a bevel button is offset from the button's edges; this value is ignored when the graphic is specified to be centered on the button.
Data type returned or set: point
kControlBevelButtonTextPlaceTag
Gets or sets the placement of a bevel button's text; see "Bevel Button Text Placement Constants".
Data type returned or set: ControlButtonTextPlacement
kControlBevelButtonMenuValueTag
Gets the menu value for a bevel button with an attached menu; see "Bevel Button Menu Constants".
Data type returned: SInt16
kControlBevelButtonMenuHandleTag
Gets the menu handle for a bevel button with an attached menu.
Data type returned: MenuHandle
kControlTriangleLastValueTag
Gets or sets the last value of a disclosure triangle. Used primarily for setting up a disclosure triangle properly when using the auto-toggle variant.
Data type returned or set: SInt16
kControlProgressBarIndeterminateTag
Gets or sets whether a progress indicator is determinate or indeterminate.
Data type returned or set: Boolean; if true, switches to an indeterminate progress indicator; if false, switches to an determinate progress indicator.
kControlTabContentRectTag
Gets the content rectangle of a tab control.
Data type returned: Rect
kControlTabEnabledFlagTag
Enables or disables a single tab in a tab control.
Data type returned or set: Boolean; if true, enabled; if false, disabled.
kControlTabInfoTag
Gets or sets information for a tab in a tab control; see "The Tab Information Structure". Available with Appearance 1.0.1 and later.
Data type returned or set: ControlTabInfoRec.
kControlGroupBoxMenuHandleTag
Gets the menu handle of a group box.
Data type returned: MenuHandle
kControlImageWellContentTag
Gets or sets the content for an image well; see "The Bevel Button and Image Well Content Structure".
Data type returned or set: ControlButtonContentInfo structure
kControlImageWellTransformTag
Gets or sets a transform that is added to the standard transform of an image well; see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: IconTransformType
kControlClockLongDateTag
Gets or sets the clock control's time or date.
Data type returned or set: LongDateRec structure
kControlUserItemDrawProcTag
Gets or sets an application-defined item drawing function. If an embedding hierarchy is established, a user pane drawing function should be used instead of an item drawing function.
Data type returned or set: UserItemUPP
kControlUserPaneDrawProcTag
Gets or sets a user pane drawing function; see MyUserPaneDrawProc. Indicates that the Control Manager needs to draw a control.
Data type returned or set: ControlUserPaneDrawingUPP
kControlUserPaneHitTestProcTag
Gets or sets a user pane hit-testing function. Indicates that the Control Manager needs to determine if a control part was hit; see MyUserPaneHitTestProc.
Data type returned or set: ControlUserPaneHitTestUPP
kControlUserPaneTrackingProcTag
Gets or sets a user pane tracking function, which will be called when a control definition function returns the kControlHandlesTracking feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane handles its own tracking; see MyUserPaneTrackingProc.
Data type returned or set: ControlUserPaneTrackingUPP
kControlUserPaneIdleProcTag
Gets or sets a user pane idle function, which will be called when a control definition function returns the kControlWantsIdle feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane performs idle processing; see MyUserPaneIdleProc.
Data type returned or set: ControlUserPaneIdleUPP
kControlUserPaneKeyDownProcTag
Gets or sets a user pane key down function, which will be called when a control definition function returns the kControlSupportsFocus feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane performs keyboard event processing; see MyUserPaneKeyDownProc.
Data type returned or set: ControlUserPaneKeyDownUPP
kControlUserPaneActivateProcTag
Gets or sets a user pane activate function, which will be called when a control definition function returns the kControlWantsActivate feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane wants to be informed of activate and deactivate events; see MyUserPaneActivateProc.
Data type returned or set: ControlUserPaneActivateUPP
kControlUserPaneFocusProcTag
Gets or sets a user pane keyboard focus function, which will be called when a control definition function returns the kControlSupportsFocus feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane handles keyboard focus; see MyUserPaneFocusProc.
Data type returned or set: ControlUserPaneFocusUPP
kControlUserPaneBackgroundProcTag
Gets or sets a user pane background function, which will be called when a control definition function returns the kControlHasSpecialBackground and kControlSupportsEmbedding feature bits in response to a kControlMsgGetFeatures message. Indicates that a user pane can set its background color or pattern; see MyUserPaneBackgroundProc.
Data type returned or set: ControlUserPaneBackgroundUPP
kControlEditTextTextTag
Gets or sets text in an editable text control.
Data type returned or set: character buffer
kControlEditTextTEHandleTag
Gets a handle to a text edit structure.
Data type returned: TEHandle
kControlEditTextSelectionTag
Gets or sets the selection in an editable text control.
Data type returned or set: ControlEditTextSelectionRec structure
kControlEditTextPasswordTag
Gets clear password text from an editable text control, that is, the text of the actual password typed, not the bullet text.
Data type returned: character buffer
kControlStaticTextTextTag
Gets or sets text in a static text control.
Data type returned or set: character buffer
kControlStaticTextTextHeightTag
Gets the height of text in a static text control.
Data type returned or set: SInt16
kControlIconTransformTag
Gets or sets a transform that is added to the standard transform of an icon; see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: IconTransformType
kControlIconAlignmentTag
Gets or sets an icon's position (centered, left, right); see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: IconAlignmentType
kControlListBoxListHandleTag
Gets a handle to a list box.
Data type returned: ListHandle
kControlFontStyleTag
Gets or sets the font style for controls that support text (includes list box, tab, clock, static and editable text).
Data type returned or set: kControlFontStyleTag
kControlKeyFilterTag
Gets or sets the key filter function for controls that handle filtered input (includes editable text and list box).
Data type returned or set: ControlKeyFilterUPP
kControlBevelButtonLastMenuTag
Gets the menu ID of the last menu selected in the submenu or main menu. Available with Appearance 1.0.1 and later.
Data type returned: SInt16
kControlBevelButtonMenuDelayTag
Gets or sets the delay (in number of ticks) before the menu is displayed. Available with Appearance 1.0.1 and later.
Data type returned or set: SInt32
kControlPopupButtonMenuHandleTag
Gets or sets the menu handle for a pop-up menu. Available with Appearance 1.0.1 and later.
Data type returned or set: MenuHandle
kControlPopupButtonMenuIDTag
Gets or sets the menu ID for a pop-up menu. Available with Appearance 1.0.1 and later.
Data type returned or set: SInt16
kControlListBoxDoubleClickTag
Checks to see whether the most recent click in a list box was a double click. Available with Appearance 1.0.1 and later.
Data type returned: Boolean; if true, the last click was a double click; if false, not.
kControlListBoxLDEFTag
Sets the 'LDEF' resource to be used to draw a list box's contents; this is useful for creating a list box without an 'ldes' resource. Available with Appearance 1.0.1 and later.
Data type set: SInt16.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998